<?php
/**
 * @author 刘国君
 * @version 1.0
 */

$ml="MESSAGE sip:34020000002000000001@192.168.1.80:9301 SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.1.92:9300;rport;branch=z9hG4bK45002270\r\nFrom: <sip:34020000001310000001@192.168.1.92>;tag=113001187\r\nTo: <sip:34020000002000000001@192.168.1.80:9301>\r\nCall-ID: 1517082125\r\nCSeq: 20 MESSAGE\r\nContent-Type: Application/MANSCDP+xml\r\nMax-Forwards: 70\r\nUser-Agent: eXosip/3.6.0\r\nContent-Length:   260\r\n\r\n<? xml version=\"1.0\"?>\r\n<Control>\r\n<CmdType>DeviceControl</CmdType>\r\n<SN>11</SN>\r\n<DeviceID>34020000001310000001</DeviceID>\r\n<PTZCmd> A50F01021F0000D6</PTZCmd>\r\n<Info>\r\n<ControlPriority>5</ControlPriority>\r\n</Info>\r\n</Control>";

$fp=stream_socket_client('udp://127.0.0.1:9301');
fwrite($fp,$ml);
echo fread($fp,1024);

